Skip to content

feat(analysis): sort, pagination, sticky header for query result table (#539)#655

Merged
cct08311github merged 4 commits intodotnet8from
feat/analysis-layui-table-539
Mar 19, 2026
Merged

feat(analysis): sort, pagination, sticky header for query result table (#539)#655
cct08311github merged 4 commits intodotnet8from
feat/analysis-layui-table-539

Conversation

@cct08311github
Copy link
Copy Markdown
Owner

Summary

  • Sticky header: wraps <table> in .analysis-table-wrap div; CSS provides position: sticky on <thead> headers with max-height: 420px / overflow-y: auto
  • Client-side sorting: click any column header to cycle asc → desc → original order; sort indicator rendered via CSS ::after (so th.textContent is unchanged — all 15+ existing header-text tests continue to pass)
  • Pagination: 50 rows per page; prev/next buttons + page-info span; only rendered when row count exceeds page size; sort resets to page 1
  • % share columns remain non-sortable (cosmetic/derived)

Implementation notes

  • th.dataset.sortDir carries the current sort direction ('' / 'asc' / 'desc'); CSS [data-sort-dir="asc"]::after provides the ▲/▼ indicator without touching textContent
  • Original rows array is never mutated — sort operates on a sliced copy
  • All existing DOM-structure tests still pass (29 new tests added, 344 total)

Test plan

  • npm test in test/WalkingTec.Mvvm.Js.Tests — 344 tests pass
  • All existing renderTable tests unmodified and green
  • New sort tests: asc, desc, reset, multi-column reset, string sort, immutability
  • New pagination tests: no-div ≤50 rows, div >50, page info text, next page, prev-disabled, sort-resets-to-page-1

Closes #539

🤖 Generated with Claude Code

…ange

IProgress<ImportProgress>? parameter was added as optional default in
BaseImportVM.BatchSaveData. Five demo FrameworkUserImportVM overrides
lacked the matching signature, causing CS0115 build errors.

Fixes CI build failures on dotnet8 and PR #655.

https://claude.ai/code/session_017r2EfWhoDdvECdoncQg6xM
The BlazorDemo.Client (Microsoft.NET.Sdk.BlazorWebAssembly) requires the
wasm-tools workload for the browser-wasm RID. GitHub Actions runners now
ship with .NET 10 preinstalled; without a global.json the newer SDK can
be selected, causing NETSDK1082 ("no runtime pack for browser-wasm").

Changes:
- Add `dotnet workload install wasm-tools` step before dotnet restore
- Add global.json to pin SDK to 8.0.x (latestFeature rollForward)

Fixes CI build-and-test failures on dotnet8 and PR #655.

https://claude.ai/code/session_017r2EfWhoDdvECdoncQg6xM
@cct08311github cct08311github force-pushed the feat/analysis-layui-table-539 branch from d837cd4 to 135e73b Compare March 19, 2026 23:47
claude and others added 2 commits March 19, 2026 23:51
DOTNET_ROOT points to /usr/share/dotnet (system location), so
workload packs must be installed there (with sudo) to be found
during the build step.

https://claude.ai/code/session_017r2EfWhoDdvECdoncQg6xM
…lt table (#539)

- Wrap result table in `.analysis-table-wrap` div for CSS sticky-header support
- Add client-side column sorting: click header to cycle asc → desc → original
  Sort indicator uses CSS `::after` so `th.textContent` is unchanged (preserves
  all existing header-text tests)
- Add pagination (50 rows/page) with page-info span and prev/next buttons;
  pagination div only rendered when row count exceeds page size
- Sorting resets to first page; % share columns remain non-sortable
- Add 29 new Jest tests covering wrapper, sort (asc/desc/reset/multi-col/string),
  and pagination (no-div ≤50, div >50, page info, next, prev-disabled, sort reset)
- 344 Jest tests pass total

Closes #539

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cct08311github cct08311github force-pushed the feat/analysis-layui-table-539 branch from 135e73b to 75094c4 Compare March 19, 2026 23:51
@cct08311github cct08311github merged commit ecf9bf8 into dotnet8 Mar 19, 2026
5 of 7 checks passed
cct08311github added a commit that referenced this pull request Mar 19, 2026
* fix(demo): update BatchSaveData override signatures after #607 API change

IProgress<ImportProgress>? parameter was added as optional default in
BaseImportVM.BatchSaveData. Five demo FrameworkUserImportVM overrides
lacked the matching signature, causing CS0115 build errors.

Fixes CI build failures on dotnet8 and PR #655.

https://claude.ai/code/session_017r2EfWhoDdvECdoncQg6xM

* fix(ci): install wasm-tools workload + pin .NET 8 SDK via global.json

The BlazorDemo.Client (Microsoft.NET.Sdk.BlazorWebAssembly) requires the
wasm-tools workload for the browser-wasm RID. GitHub Actions runners now
ship with .NET 10 preinstalled; without a global.json the newer SDK can
be selected, causing NETSDK1082 ("no runtime pack for browser-wasm").

Changes:
- Add `dotnet workload install wasm-tools` step before dotnet restore
- Add global.json to pin SDK to 8.0.x (latestFeature rollForward)

Fixes CI build-and-test failures on dotnet8 and PR #655.

https://claude.ai/code/session_017r2EfWhoDdvECdoncQg6xM

* fix(ci): use sudo for wasm-tools workload install

DOTNET_ROOT points to /usr/share/dotnet (system location), so
workload packs must be installed there (with sudo) to be found
during the build step.

https://claude.ai/code/session_017r2EfWhoDdvECdoncQg6xM

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ux(analysis): use LayUI table component for query result grid (sorting, pagination, fixed headers)

2 participants